package cn.darkhorse.alarm.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 报警记录表
 * </p>
 *
 * @author maoguanjun
 * @since 2023-04-07
 */
@Getter
@Setter
  @TableName("alarm_record_info")
@ApiModel(value = "AlarmRecordInfo对象", description = "报警记录表")
public class AlarmRecordInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("报警状态（0：未处理1：已处理）")
    @Excel(name = "报警状态",readConverterExp = "0=未处理,1=已处理",sort = 1)
    private Integer alarmStatus;

    @ApiModelProperty("报警时间")
    @Excel(name = "报警时间", dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 2)
    private LocalDateTime alarmDate;

    @ApiModelProperty("设备ID")
    private Long deviceId;

    @ApiModelProperty("参数ID")
    private Long parameterId;

    @ApiModelProperty("报警类型0：开关量1：参数")
    private Integer parameterType;


    @ApiModelProperty("限值")
    private String limitValue;

    @Excel(name = "报警值")
    @ApiModelProperty("报警值")
    private String alarmValue;


    @Excel(name = "参数值")
    private String alarmParamsName;

    @ApiModelProperty("报警文本")
    @Excel(name = "报警文本")
    private String alarmMessage;

    @ApiModelProperty("报警通知人")
    private String alarmNotifier;

    @ApiModelProperty("报警通知人昵称")
    @Excel(name = "报警通知人")
    private String alarmNotifierName;

    @ApiModelProperty("限值报警 限值类型：0小于限值 1大于限值")
    private Integer limitType;

    @ApiModelProperty("开关量报警 0:true--fale 1:false--true")
    private Integer changeType;

    @ApiModelProperty("连续报警报警值")
    private BigDecimal immediatelyValue;

    @ApiModelProperty("报警频率：0/实时报警 1/间隔报警")
    private Integer alarmFrequency;


    @ApiModelProperty("处理人")
    private Long handler;

    @Excel(name = "处理人")
    @ApiModelProperty("处理人")
    @TableField(exist = false)
    private String handlerName;

    @Excel(name = "处理时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("处理时间")
    private LocalDateTime handleDate;


    @ApiModelProperty("处理图片")
    @Excel(name = "处理图片" ,cellType = Excel.ColumnType.IMAGE)
    private String alarmPic;

    @Excel(name = "处理描述")
    @ApiModelProperty("处理描述")
    private String handleDescription;

    private Integer alarmType;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

}
